﻿using System.Collections.ObjectModel;
using Coniometer.Model;
using Prism.Mvvm;

namespace Coniometer.ViewModels
{
    public class SimpleSchemePageViewModel : BindableBase
    {
        private ObservableCollection<SimpleSchemeModel> _schemeCollection =
            new ObservableCollection<SimpleSchemeModel>();

        public ObservableCollection<SimpleSchemeModel> SchemeCollection
        {
            get => _schemeCollection;
            set
            {
                _schemeCollection = value;
                RaisePropertyChanged();
            }
        }

        public SimpleSchemePageViewModel()
        {
            for (var i = 1; i < 15; i++)
            {
                var model = new SimpleSchemeModel
                {
                    SpaceName = "方案名称123",
                    SimpleTime = "00:10:00",
                    DelayTime = "00:05:05",
                    IntervalTime = "00:05:00",
                    CycleTimes = i,
                    Unit = "Σ/#"
                };
                SchemeCollection.Add(model);
            }
        }
    }
}